<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>在本次请求结束后终止 apache 子进程</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.apache.html">Apache 函数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.apache-get-modules.html">apache_get_modules</a></div>
 <div class="up"><a href="ref.apache.html">Apache 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.apache-child-terminate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">apache_child_terminate</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5)</p><p class="refpurpose"><span class="refname">apache_child_terminate</span> &mdash; <span class="dc-title">在本次请求结束后终止 apache 子进程</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.apache-child-terminate-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>apache_child_terminate</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>apache_child_terminate()</strong></span>
   将把运行当前 PHP 请求的 Apache 子进程注册为终止状态，一旦结束
   PHP 代码的运行此进程将终止。可以用在占用大量内存的脚本后面来终止该进程，因为通常内存只在内部释放而不会还给操作系统。
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.apache-child-terminate-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   如果 PHP 以 Apache 1 模块方式运行，且 Apache
   的版本是非多线程的，以及激活了 PHP 指令.
   <a href="apache.configuration.html#ini.child-terminate" class="link">child_terminate</a>，则返回
   <strong><code>TRUE</code></strong>。如果不满足上述条件则返回 <strong><code>FALSE</code></strong> 并生成一条
   <strong><code>E_WARNING</code></strong> 级的错误信息。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.apache-child-terminate-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.4.0</td>
       <td>
        该函数目前也可以用于FastCGI模式了。以前，它仅在PHP作为Apapche的模块安装时支持。
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 
 <div class="refsect1 notes" id="refsect1-function.apache-child-terminate-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">此函数未在 Windows 平台下实现。</span></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.apache-child-terminate-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.exit.html" class="function" rel="rdfs-seeAlso">exit()</a> - 输出一个消息并且退出当前脚本</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.apache.html">Apache 函数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.apache-get-modules.html">apache_get_modules</a></div>
 <div class="up"><a href="ref.apache.html">Apache 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
